package com.jereh.topnews.fragment;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jereh.topnews.R;
import com.jereh.topnews.activity.SettingActivity;

/**
 * Created by Administrator on 2016/11/3.
 */
public class UserCenterFragment extends Fragment implements View.OnClickListener{

    private Context ctx;

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        this.ctx=context;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_user_center,null);
        view.findViewById(R.id.setup).setOnClickListener(this);
        return view;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.setup:
                startActivity(new Intent(ctx, SettingActivity.class));
                break;
        }
    }
}
